FIND_PATH(DIRECTWRITE_INCLUDE_DIR dwrite.h)
FIND_LIBRARY(DIRECTWRITE_LIBRARY NAMES dwrite)
FIND_LIBRARY(DIRECT2D_LIBRARY NAMES d2d1)

IF(DIRECTWRITE_INCLUDE_DIR AND DIRECTWRITE_LIBRARY AND DIRECT2D_LIBRARY)
    SET(EXTERNAL_INCLUDE_DIR ${DIRECTWRITE_INCLUDE_DIR})
    SET(EXTERNAL_LIBRARIES ${DIRECTWRITE_LIBRARY} ${DIRECT2D_LIBRARY})
    
    SET(EXAMPLE_NAME osgdirectwrite)
    SET(EXAMPLE_FILES osgdirectwrite.cpp DirectWriteImage.cpp GdiTextRenderer.cpp)
    START_EXAMPLE()
ENDIF(DIRECTWRITE_INCLUDE_DIR AND DIRECTWRITE_LIBRARY AND DIRECT2D_LIBRARY)
